import java.util.Scanner;

public class 组合求解 {
    
    public static void main(String[] args) {
        
        try{

            //计算组合 A
            Scanner scanner = new Scanner(System.in);

            int top = scanner.nextInt();
            int bottom = scanner.nextInt();

            System.out.println("组合 A="+computerA(bottom, top));
            System.out.println("组合 C="+computerC(bottom, top));


        }catch(Exception e){
            e.printStackTrace();
        }

    }

    //计算 组合C
    private static long computerC(int bottom, int top){

        long A = computerA(bottom, top);

        // top 阶乘
        long topJ = computerJ(top);


        return A / topJ;
    }

    //计算阶乘
    private static long computerJ(int n){

        long result = 1;
        for(int i=1; i<=n; i++){

            result *= (n - (i-1));
        }

        return result;


    }

    //计算组合A
    private static long computerA(int bottom, int top){

        long result = 1L;

        for(int i=1; i<=top; i++){

            result *= (bottom - (i-1));
        }


        return result;

    }
}
